package DAL;
/**hofit**/
import java.util.ArrayList;

public class Subject_DAL {
	
	private int subjectID;
	
	private String subjectName;
	
	/**
	 * 
	 * @param arrSubject
	 * constructor
	 */
	public Subject_DAL(ArrayList<String> arrSubject) {
		super();
		this.subjectID = Integer.parseInt(arrSubject.get(0));
		this.subjectName = arrSubject.get(1);
	}

	/**
	 * 
	 * @return get Author ID
	 */
	public int getAuthorID() {
		return subjectID;
	}
	/**
	 * 
	 * @param authorID
	 *  set Author ID
	 */
	public void setAuthorID(int authorID) {
		this.subjectID = authorID;
	}
	/**
	 * 
	 * @return get Author Name
	 */
	public String getAuthorName() {
		return subjectName;
	}
	/**
	 * 
	 * @param authorName
	 * set Author Name
	 */
	public void setAuthorName(String authorName) {
		this.subjectName = authorName;
	}
	
	

	
	/**
	 * 
	 * @param subject
	 * @return Subject_DAL
	 * convert Author class to array list
	 */
	public ArrayList<String> subjectToArray(Subject_DAL subject)
	{
		ArrayList<String> arrSubject = new ArrayList<String>();
		arrSubject.add(Integer.toString(subject.subjectID));
		arrSubject.add(subject.subjectName);
		return arrSubject;
	}

}
